<template>
	<view class="container">
		<!-- 		<uni-card :is-shadow="false" is-full>
			<text class="uni-h6">卡片组件通用来显示完整独立的一段信息，同时让用户理解他的作用。例如一篇文章的预览图、作者信息、时间等，卡片通常是更复杂和更详细信息的入口点。</text>
		</uni-card>
		<uni-section title="基础卡片" type="line">
			<uni-card :is-shadow="false">
				<text class="uni-body">这是一个基础卡片示例，内容较少，此示例展示了一个没有任何属性不带阴影的卡片。</text>
			</uni-card>
		</uni-section> -->
		<uni-section title="您手机号绑定的孩子信息有" type="line" >
			<uni-card v-for="child in children" :title="child.name" :extra="child.gender" @click="choose(child.id)">
				<text class="uni-body" style="font-weight: bolder;" space="nbsp">{{child.schoolName}}  —— 	 {{child.klassName}}</text> 
			</uni-card>
		</uni-section>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				cover: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg',
				avatar: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png',
				extraIcon: {
					color: '#4cd964',
					size: '22',
					type: 'gear-filled'
				},
				page: [],
				children: []
			}
		},
		onLoad(option) {
			this.children = JSON.parse(option.children)
			console.log("children", this.children)
		},
		methods: {
			choose(id) {
				console.log(id)
				uni.setStorageSync('studentId', id+'');
				uni.switchTab({
					url:'../../index/index'
				})
			},
			actionsClick(text) {
				uni.showToast({
					title: text,
					icon: 'none'
				})
			}
		}
	}
</script>


<style>
</style>
